use Dosvid
go

update c set
 IsContactPerson = 1
from Candidates c
where 
exists(select 1
	   from Employer_ContactPersons cp
	   where cp.CandidatId = c.Id)

